﻿<%@ Page Title="" Language="C#" MasterPageFile="~/painel/SiteMaster_Painel.Master" AutoEventWireup="true" CodeBehind="frmUsuarios.aspx.cs" Inherits="Site_CamaraTibau.painel.frmUsuarios" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


  <asp:UpdatePanel ID="updPanel" runat="server">
        <ContentTemplate>
        

        <br clear="all" />

        <div align="center">
            <div class="alert-message error">
                <asp:Label ID="lblErro" runat="server" Font-Bold="True"></asp:Label>
            </div>
            <div class="alert-message success">
                <asp:Label ID="lblSucesso" runat="server" Font-Bold="True" ></asp:Label>
            </div>
        </div>

        <div class="SubPagina_Painel">

            <h3>
                Usuários - <asp:Label ID="lblHeader" runat="server" Text=""></asp:Label>
            </h3>

            <br clear="all" />

            <asp:MultiView ID="mtv" runat="server">
                 
                <asp:View ID="viewListagem" runat="server" onactivate="viewListagem_Activate"  >
                    <asp:Panel ID="pnlListagem" runat="server" >
                        
                        <div style="float: left; height: auto; width:100%;">
                            <div  style="float: left; height: auto; margin-right:10px;"> 
                                <asp:Label ID="Label3" runat="server" AssociatedControlID="txtPesquisarID" Width="100px" Text="ID:" CssClass="lbl" /><br />
                                <asp:TextBox ID="txtPesquisarID" runat="server" CssClass="textBox" Width="60px"></asp:TextBox>
                            </div>
                            <div  style="float: left; height: auto; margin-right:10px;"> 
                                <asp:Label ID="Label5" runat="server" AssociatedControlID="txtPesquisarLogin" Width="120px" Text="Login:" CssClass="lbl" /><br />
                                <asp:TextBox ID="txtPesquisarLogin" runat="server" CssClass="textBox" Width="120px" ></asp:TextBox>
                            </div>
                            <div  style="float: left; height: auto; margin-right:10px;"> 
                                <asp:Label ID="Label4" runat="server" AssociatedControlID="txtPesquisarNome" Width="200px" Text="Nome:" CssClass="lbl" /><br />
                                <asp:TextBox ID="txtPesquisarNome" runat="server" CssClass="textBox" Width="320px"></asp:TextBox>
                            </div>
                        </div>



                          <br clear="all" />

                                <div style="float: left; height: auto;  margin:10px 0px 10px 0px; width:100%; ">

                                    <div style="float:left; height:auto; margin-bottom:0px; width:50%;">
                                        <asp:Button ID="btnPesquisar" runat="server" Text="Pesquisar" CssClass="btn primary" onclick="btnPesquisar_Click" />
                                    </div>
                                    <div style="float:left; height:auto; margin-bottom:0px; width:50%; text-align:right;">
                                        <asp:Button ID="btnNovo" runat="server" Text="Cadastrar Partido" CssClass="btn info" onclick="btnNovo_Click"  />
                                    </div>
                                </div>


                        <br clear="all" />

                        <div style="float: left; height: auto;  width:100%;">
                            <h3><asp:Label ID="lblNumeroLinhas" runat="server" Text=""></asp:Label></h3>
                        </div>

                        <br clear="all" />

                        <div style="float: left; height: auto; margin: 0px 0px 20px 0px; width:100%; ">
                            <asp:GridView ID="gvListagem" 
                                runat="server" 
                                AutoGenerateColumns="false"
                                CellPadding="2" 
                                ForeColor="#333333" 
                                GridLines="None"
                                AllowPaging="true"
                                PageSize="10"
                                ShowFooter="false"
                                EmptyDataText="Nenhum Usuário foi localizado!"
                                OnRowCreated="gvListagem_RowCreated"
                                OnRowCommand="gvListagem_RowCommand"
                                OnPageIndexChanging="gvListagem_PageIndexChanging"
                                Width="100%"
                                >
                                <Columns>
                                <asp:TemplateField HeaderText="ID">
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="60px" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblID" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>


                                
                                <asp:TemplateField HeaderText="Login">
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"  Width="160px" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblLogin" runat="server" Text='<%# Eval("Login") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Nome Completo">
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblNome" runat="server" Text='<%# Eval("Nome") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                    <asp:TemplateField>
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="20px" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="btnEditar" Text="Editar" runat="server" CausesValidation="false"
                                            CommandName="cmdEditar" CommandArgument='<%# Eval("ID")  %>' 
                                            ImageUrl="~/img/icon_edit.png" ToolTip='<%# String.Concat("Editar: ", Eval("Nome")) %>' />
                                        </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="20px" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="btnExcluir" Text="Excluir" runat="server" CausesValidation="false"
                                            CommandName="cmdExcluir" CommandArgument='<%# Eval("ID")  %>' 
                                            ImageUrl="~/img/icon_remove.png" ToolTip='<%# String.Concat("Excluir: ", Eval("Nome")) %>' OnClientClick="javascript:return confirm('Deseja realmente excluir este registro ?');" />
                                        </ItemTemplate>
                                </asp:TemplateField>
                                </Columns>
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#284775" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                                <PagerStyle BackColor="#5D7B9D" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            </asp:GridView>
                            
                        </div>

                    </asp:Panel>
                </asp:View>


                <asp:View ID="viewFormulario" runat="server" onactivate="viewFormulario_Activate" >
                    <asp:Panel ID="pnlFormulario" runat="server" DefaultButton="btnSalvar">

                        <div style="float: left; height: auto; width:100%; margin:0px 0px 10px 0px;">
                            <div  style="float: left; height: auto; margin-right:20px;"> 
                                <asp:Label ID="Label11" runat="server" AssociatedControlID="lblID" Width="60px" Text="ID:" CssClass="lbl" /><br />
                                <asp:Label ID="lblID" runat="server" Text="" Width="60px"></asp:Label>
                            </div>
                        </div>
                        
                        <br clear="all" />

                        <div style="float: left; height: auto; width:100%;">
                             <div  style="float: left; height: auto; margin-right:10px;"> 
                                <asp:Label ID="Label1" runat="server" AssociatedControlID="txtNome" Width="100px" Text="Nome Completo:" CssClass="lbl" /><br />
                                <asp:TextBox ID="txtNome" runat="server" CssClass="textBox" Width="280px"></asp:TextBox>
                            </div>
                             <div  style="float: left; height: auto; margin-right:10px;"> 
                                <asp:Label ID="Label2" runat="server" AssociatedControlID="txtEmail" Width="100px" Text="Email:" CssClass="lbl" /><br />
                                <asp:TextBox ID="txtEmail" runat="server" CssClass="textBox" Width="220px"></asp:TextBox>
                            </div>
                            <div  style="float: left; height: auto; margin-right:10px;"> 
                                <asp:Label ID="Label6" runat="server" AssociatedControlID="txtLogin" Width="100px" Text="Login:" CssClass="lbl" /><br />
                                <asp:TextBox ID="txtLogin" runat="server" CssClass="textBox" Width="200px"></asp:TextBox>
                            </div>
                            <div  style="float: left; height: auto; margin-right:10px;"> 
                                <asp:Label ID="Label7" runat="server" AssociatedControlID="txtSenha" Width="100px" Text="Senha:" CssClass="lbl" /><br />
                                <asp:TextBox ID="txtSenha" runat="server" CssClass="textBox" Width="100px" TextMode="Password"></asp:TextBox>
                            </div>
                        </div>
                        <br clear="all" />
                        <div style="float: left; height: auto; width:100%; margin:10px 0px 10px 0px;">
                            <asp:Button ID="btnSalvar" runat="server" Text="Salvar" CssClass="btn primary" OnClick="btnSalvar_Click" />
                            <asp:Button ID="btnLimpar" runat="server" Text="Limpar" CssClass="btn close" OnClick="btnLimpar_Click"/>
                            <asp:Button ID="btnVoltar" runat="server" Text="Voltar" CssClass="btn info"  OnClick="btnVoltar_Click"/>
                        </div>
                    </asp:Panel>
                </asp:View>

            </asp:MultiView>

        </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
